package com.itheima;

import com.itheima.controller.BookController;
import com.itheima.dao.BookDao;
import com.itheima.service.BookService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class App {
    public static void main(String[] args) {
        //3.解析配置文件-获得容器
        ApplicationContext app = new ClassPathXmlApplicationContext("application-config.xml");
        BookDao bookDao = app.getBean(BookDao.class);
        bookDao.save();
        BookService bookService = app.getBean(BookService.class);
        bookService.save();
        BookController bookController = app.getBean(BookController.class);
        bookController.save();
    }
}
